Action names

When declaring Actions in MDriven, you have the option of giving a name (required) and a Presentation (defaults to <Name>).

The reason for the two different properties is that the ActionName must be globally unique for all actions. It is used for the presentation of the action and as a reference name of the action. The presentation is, however, the text we use when presenting the action in a contextmenu or in the MDriven Prototype left-side action column.

Since the Presentation often resembles the Name, we have introduced the following shorthand/activecontent:

ActionName Presentation value Presentation result
Somename <Name> Somename
SomeName <Name> Some Name
SomeName Extra1 <Name>

Extra2

Extra1 Some Name Extra 2
SomeName <AsString> “DefaultStringRep of context object”
SomeName <Name>

<AsString>

Some Name “DefaultStringRep of context object”
SomeName <AsString:Attribute1> “Value of attribute1 of context object”
SomeName Extra1 <Name>

Extra2 <AsString:Attribute1> Extra3

Extra1 Some Name Extra 2 “Value of attribute1 of context object” Extra 3

The context object is of course the object that the actions are acting on. So it is intended to be used with “Class actions”.

Constraints descriptions

As we introduced the above-mentioned shorthand, we also made the <AsString:attributeX> part available in the constraints Description texts. This way your constraints descriptions can get context info. If you have the need for a complex expression, like navigation for pulling attributes from neighbor classes, you are advised to create the expression as a derived attribute that you then can reference from your constraint description text.

The MDriven Book - See also: Microsoft office and OpenDocument as a Report generator

This page was edited 25 days ago on 04/02/2024. What links here